package com.example.administrator.testxingpiao.ui.main.mine;

import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.view.View;
import android.view.Window;
import android.widget.ImageView;

import com.example.administrator.testxingpiao.R;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

public class AdressActivity extends AppCompatActivity {
    @BindView(R.id.button_addnewaddress)
    ImageView mImageview;
    private Toolbar mToolBarAddressManager;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        supportRequestWindowFeature(Window.FEATURE_NO_TITLE);
        setContentView(R.layout.activity_adress);
        ButterKnife.bind(this);
        mToolBarAddressManager= (Toolbar) findViewById(R.id.toolbaraddressmanager);
        mToolBarAddressManager.setNavigationIcon(R.mipmap.gary_arrowbtn);
        mToolBarAddressManager.setNavigationOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                //一点就后退
                onBackPressed();
            }
        });
    }

    @OnClick(R.id.button_addnewaddress)
    public void onClick() {
        mImageview.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent=new Intent(AdressActivity.this,NewAddressActivity.class);
                startActivity(intent);
            }
        });
    }
}
